<?php 
class Gt_Pos_Block_Adminhtml_Order_Customergrid_Renderer_Addcustomer extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{   /**
     * Renders grid column
     *
     * @param   Varien_Object $row
     * @return  string
     */
    public function render(Varien_Object $row)
    {        
        $customer = (int)$row["entity_id"];
		
		$user = Mage::getModel('customer/customer')->load($customer);
		//$product = Mage::getModel('catalog/product')->load($productId);
		$username = $user->getFirstname().' '.$user->getLastname();
		//$storeId    = $product->getStoreId();
		//$websiteId  = Mage::app()->getStore($storeId)->getWebsiteId();
		//$dateTs     = Mage::app()->getLocale()->storeTimeStamp($storeId);
		$customerGroupId = $user->getGroupId();
		$group = Mage::getModel('customer/group')->load($customerGroupId);
		$groupname = $group->getCode();
		//$resource = Mage::getResourceModel('catalogrule/rule');

		//$rules = $resource->getRulesFromProduct($dateTs, $websiteId, $customerGroupId, $productId);
		
        $html = '<a href="javascript:void(0);" title="Add customer" onclick="javascript:clickCustomer('.$customer.',\''.$username.'\',\''.$customerGroupId.'\',\''.$groupname.'\')"><img src="'.$this->getSkinUrl('images/gt_pos/add.png').'"/></a>';
		
		return $html;
		
    }
}

?> 